import { postAxios, getAxios, postDownloadAxios } from '@/lib/http';

export const orgApi = {
    // 添加 @author Tony
    addOrg: (data) => {
        return postAxios('/org/add', data);
    },
    // 分页查询 @author Tony
    queryOrg: (data) => {
        return postAxios('/org/page/query', data);
    },
     // 查询部门列表
    getOrgList: () => {
        return getAxios('/org/listAll');
    },
    // 批量删除 @author Tony
    batchDeleteOrg: (idList) => {
        return postAxios('/org/deleteByIds', idList);
    },
    // 修改  @author Tony
    updateOrg: (data) => {
        return postAxios('/org/update',data);
    },
    // 导出全部  @author Tony
    exportAll:(data)=>{
        return postDownloadAxios('/org/export/all',data);
    },
    // 批量导出  @author Tony
    batchExport: (idList) => {
        return postDownloadAxios('/org/export/batch', idList);
    },
};
